﻿/**
 * @file		ct_dd_pmc.c
 * @brief		PMC driver Component Test
 * @note		None
 * @attention	None
 * 
 * <B><I>Copyright 2016 Socionext Inc.</I></B>
 */

#include <stdlib.h>
#include <string.h>
#include "driver_common.h"
#include "ct_dd_pmc.h"
#include "dd_pmc.h"
#include "pmc.h"

/*----------------------------------------------------------------------*/
/* Definition															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Enumeration															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Structure															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Global Data															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Local Method Definition												*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Local Function														*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Global Function														*/
/*----------------------------------------------------------------------*/
/**
 * @brief  Command main function for PMC test.
 * @param  int argc	:The number of parameters
 *		   char** argv	:The value of parameters
 * @return VOID
 */
VOID Ct_Dd_Pmc_Main(int argc, char** argv)
{
	int					param2;
	int					param3;
	int					param4;
	ULONG				reg_data;
	
	if(strcmp(argv[1], "gpio_iicr") == 0){
		// get 2nd paramter.
		param2 = atoi(argv[2]);
		
		if (param2 == 0) {
			// GPIO initial inputs code register P07-P00.
			reg_data = Dd_PMC_GPIO_IICR_Get_P07_00();
			
			Ddim_Print(("Dd_PMC_GPIO_IICR_Get_P07_00 : execute.\n"));
			// register data output.
			Ddim_Print(("--- PMC Register ---\n"));
			Ddim_Print(("GPIO_IICR : 0x%08x\n", IO_PMC.GPIO_IICR.word));
			// register data output.
			Ddim_Print(("--- Get Data -------\n"));
			Ddim_Print(("P07_00    : 0x%04x\n", reg_data));
			Ddim_Print(("--------------------\n"));
		}
		else if (param2 == 1) {
			// GPIO initial inputs code register P17-P10.
			reg_data = Dd_PMC_GPIO_IICR_Get_P17_10();
			
			Ddim_Print(("Dd_PMC_GPIO_IICR_Get_P17_10 : execute.\n"));
			// register data output.
			Ddim_Print(("--- PMC Register ---\n"));
			Ddim_Print(("GPIO_IICR : 0x%08x\n", IO_PMC.GPIO_IICR.word));
			// get data output.
			Ddim_Print(("--- Get Data -------\n"));
			Ddim_Print(("P17-10    : 0x%04x\n", reg_data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "irsir") == 0){
		// Internal reset signal indication register.
		reg_data = Dd_PMC_GPIO_IRSIR_Get_HRRSTX();
		
		Ddim_Print(("Dd_PMC_GPIO_IRSIR_Get_HRRSTX : execute.\n"));
		// register data output.
		Ddim_Print(("--- PMC Register ---\n"));
		Ddim_Print(("IRSIR : 0x%08x\n", IO_PMC.IRSIR.word));
		// get data output.
		Ddim_Print(("--- Get Data -------\n"));
		Ddim_Print(("irsir : 0x%08x\n", reg_data));
		Ddim_Print(("--------------------\n"));
	}
	else if(strcmp(argv[1], "mdr") == 0){
		// get 2nd paramter.
		param2 = atoi(argv[2]);
		
		if (param2 == 0) {
			// chip version.
			reg_data = Dd_PMC_MDR_Get_VER();
			
			Ddim_Print(("Dd_PMC_MDR_Get_VER : execute.\n"));
			// register data output.
			Ddim_Print(("--- PMC Register ---\n"));
			Ddim_Print(("MDR     : 0x%08x\n", IO_PMC.MDR.word));
			// register data output.
			Ddim_Print(("--- Get Data -------\n"));
			Ddim_Print(("version : 0x%04x\n", reg_data));
			Ddim_Print(("--------------------\n"));
		}
		else if (param2 == 1) {
			// MD.
			reg_data = Dd_PMC_MDR_Get_MD();
			
			Ddim_Print(("Dd_PMC_MDR_Get_MD : execute.\n"));
			// register data output.
			Ddim_Print(("--- PMC Register ---\n"));
			Ddim_Print(("MDR : 0x%08x\n", IO_PMC.MDR.word));
			// get data output.
			Ddim_Print(("--- Get Data -------\n"));
			Ddim_Print(("md  : 0x%04x\n", reg_data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "prselm1") == 0){
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			if (param3 == 0) {
				// Set selection whether noise filter of I2C(ISCLH) exists or not.
				Dd_PMC_PERSELM1_Set_SCLNCH(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SCLNCH : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 1) {
				// Set selection whether noise filter of I2C(ISDAH) exists or not.
				Dd_PMC_PERSELM1_Set_SDANCH(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SDANCH : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 2) {
				// Set the number of stages of the noise filter.
				Dd_PMC_PERSELM1_Set_I2CHCNT(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_I2CHCNT : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 3) {
				// Set the Pull-Up/Down resistance of SP0MISO terminal On or Off.
				Dd_PMC_PERSELM1_Set_SP0MISOPE(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0MISOPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 4) {
				// Set the Pull-Up/Down resistance of SP0MOSI terminal On or Off.
				Dd_PMC_PERSELM1_Set_SP0MOSIPE(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0MOSIPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 5) {
				// Set the Pull-Up/Down resistance of SP0SCK terminal On or Off.
				Dd_PMC_PERSELM1_Set_SP0SCKPE(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0SCKPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 6) {
				// Set the Pull-Up/Down resistance of SP0CSX terminal On or Off.
				Dd_PMC_PERSELM1_Set_SP0CSPE(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0CSPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 7) {
				// Set the Pull-up/down resistance of SP0MISO terminal Pull-down or Pull-up.
				Dd_PMC_PERSELM1_Set_SP0MISOUDC(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0MISOUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 8) {
				// Set the Pull-up/down resistance of SP0MOSI terminal Pull-down or Pull-up.
				Dd_PMC_PERSELM1_Set_SP0MOSIUDC(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0MOSIUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 9) {
				// Set the Pull up/down selection of SP0SCK terminal Pull-down or Pull-up.
				Dd_PMC_PERSELM1_Set_SP0SCKUDC(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0SCKUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 10) {
				// Set the Pull up/down selection of SP0CSX terminal Pull-down or Pull-up.
				Dd_PMC_PERSELM1_Set_SP0CSUDC(param4);
				
				Ddim_Print(("Dd_PMC_PERSELM1_Set_SP0CSUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			
			if (param3 == 0) {
				// Get selection whether noise filter of I2C(ISCLH) exists or not.
				reg_data = Dd_PMC_PERSELM1_Get_SCLNCH();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SCLNCH : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				// register data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sclnch   : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 1) {
				// Get selection whether noise filter of I2C(ISDAH) exists or not.
				reg_data = Dd_PMC_PERSELM1_Get_SDANCH();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SDANCH : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sdanch   : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 2) {
				// Get the number of stages of the noise filter.
				reg_data = Dd_PMC_PERSELM1_Get_I2CHCNT();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_I2CHCNT : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("i2chcnt  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 3) {
				// Get the Pull-Up/Down resistance of SP0MISO terminal On or Off.
				reg_data = Dd_PMC_PERSELM1_Get_SP0MISOPE();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0MISOPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1  : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0misope : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 4) {
				// Get the Pull-Up/Down resistance of SP0MOSI terminal On or Off.
				reg_data = Dd_PMC_PERSELM1_Get_SP0MOSIPE();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0MOSIPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1  : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0mosipe : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 5) {
				// Get the Pull-Up/Down resistance of SP0SCK terminal On or Off.
				reg_data = Dd_PMC_PERSELM1_Get_SP0SCKPE();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0SCKPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0sckpe : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 6) {
				// Get the Pull-Up/Down resistance of SP0CSX terminal On or Off.
				reg_data = Dd_PMC_PERSELM1_Get_SP0CSPE();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0CSPE : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0cspe  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 7) {
				// Get the Pull-up/down resistance of SP0MISO terminal Pull-down or Pull-up.
				reg_data = Dd_PMC_PERSELM1_Get_SP0MISOUDC();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0MISOUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1   : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0misoudc : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 8) {
				// Get the Pull-up/down resistance of SP0MOSI terminal Pull-down or Pull-up.
				reg_data = Dd_PMC_PERSELM1_Get_SP0MOSIUDC();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0MOSIUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1   : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0mosiudc : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 9) {
				// Get the Pull up/down selection of SP0SCK terminal Pull-down or Pull-up.
				reg_data = Dd_PMC_PERSELM1_Get_SP0SCKUDC();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0SCKUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1  : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0sckudc : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 10) {
				// Get the Pull up/down selection of SP0CSX terminal Pull-down or Pull-up.
				reg_data = Dd_PMC_PERSELM1_Get_SP0CSUDC();
				
				Ddim_Print(("Dd_PMC_PERSELM1_Get_SP0CSUDC : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("PERSELM1 : 0x%08x\n", IO_PMC.PERSELM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("sp0csudc : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "dbcntm1") == 0){
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			// get 4th paramter.
			param4 = atoi(argv[4]);
			
			if (param3 == 0) {
				// Set the control drivability 00.
				Dd_PMC_DBCNTM1_Set_T00DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T00DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 1) {
				// Set the control drivability 01.
				Dd_PMC_DBCNTM1_Set_T01DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T01DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 2) {
				// Set the control drivability 02.
				Dd_PMC_DBCNTM1_Set_T02DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T02DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 3) {
				// Set the control drivability 03.
				Dd_PMC_DBCNTM1_Set_T03DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T03DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 4) {
				// Set the control drivability 04.
				Dd_PMC_DBCNTM1_Set_T04DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T04DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 5) {
				// Set the control drivability 05.
				Dd_PMC_DBCNTM1_Set_T05DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T05DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 6) {
				// Set the control drivability 06.
				Dd_PMC_DBCNTM1_Set_T06DCM(param4);
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Set_T06DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if(strcmp(argv[2], "get") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			
			if (param3 == 0) {
				// Get the control drivability 00.
				reg_data = Dd_PMC_DBCNTM1_Get_T00DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T00DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// register data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t00dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 1) {
				// Get the control drivability 01.
				reg_data = Dd_PMC_DBCNTM1_Get_T01DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T01DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t01dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 2) {
				// Get the control drivability 02.
				reg_data = Dd_PMC_DBCNTM1_Get_T02DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T02DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t02dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 3) {
				// Get the control drivability 03.
				reg_data = Dd_PMC_DBCNTM1_Get_T03DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T03DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t03dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 4) {
				// Get the control drivability 04.
				reg_data = Dd_PMC_DBCNTM1_Get_T04DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T04DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t04dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 5) {
				// Get the control drivability 05.
				reg_data = Dd_PMC_DBCNTM1_Get_T05DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T05DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t05dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else if (param3 == 6) {
				// Get the control drivability 06.
				reg_data = Dd_PMC_DBCNTM1_Get_T06DCM();
				
				Ddim_Print(("Dd_PMC_DBCNTM1_Get_T06DCM : execute.\n"));
				// register data output.
				Ddim_Print(("--- PMC Register ---\n"));
				Ddim_Print(("DBCNTM1 : 0x%08x\n", IO_PMC.DBCNTM1.word));
				// get data output.
				Ddim_Print(("--- Get Data -------\n"));
				Ddim_Print(("t06dcm  : %d\n", reg_data));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "avs") == 0){
		// Get AVS code.
		reg_data = Dd_PMC_AVS_Get_AVS();
		
		Ddim_Print(("Dd_PMC_AVS_Get_AVS : execute.\n"));
		// register data output.
		Ddim_Print(("--- PMC Register ---\n"));
		Ddim_Print(("AVS : 0x%08x\n", IO_PMC.AVS.word));
		// get data output.
		Ddim_Print(("--- Get Data -------\n"));
		Ddim_Print(("avs : 0x%08x\n", reg_data));
		Ddim_Print(("--------------------\n"));
	}
	else{
		Ddim_Print(("please check 1st parameter!!\n"));
	}
}
